package com.pactera.listener;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * Created by pactera on 2017/11/9.
 */
public class QueueMessageListener implements MessageListener {
   public void onMessage(Message message) {
      TextMessage tm = (TextMessage) message;
      try {
         System.out.println("QueueMessageListener监听到了文本消息：\t"
               + tm.getText());
         //do something ...
      } catch (JMSException e) {
         e.printStackTrace();
      }
   }
}
